package com.tiny.shiro.web.listener;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;

public class MySessionListener1 implements SessionListener {

    @Override
    public void onStart(Session session) {//会话创建时触发
        System.out.println("监听器1监听到会话创建：" + session.getId());
    }
    @Override
    public void onExpiration(Session session) {//会话过期时触发
        System.out.println("监听器1监听到会话过期：" + session.getId());
    }
    @Override
    public void onStop(Session session) {//退出/会话过期时触发
        System.out.println("监听器1监听到会话停止：" + session.getId());
    }

}
